package com.bkgy.controller.accident.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Pattern;

@Data
public class TAccident {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @NotNull(message = "提出时间不能为空")
    @Pattern(regexp = "^[1-9]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
            message = "时间格式应为：yyyy-MM-dd")
    private String submissionTime;
    @NotNull(message = "责任人不能为空")
    private String responsibleParty;
    @NotNull(message = "问题内容不能为空")
    private String problem;
    @Pattern(regexp = "^[1-9]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
            message = "时间格式应为：yyyy-MM-dd")
    private String estResoTime;
    private String eqpFeedback;
    private String collaborate;
    @Pattern(regexp = "已完成|未完成|待备件|待研究|紧急|特急|一般|不急", message = "状态信息不正确")
    private String completeStatus;
    @TableField(exist = false)
    private String status = "";
}
